<?php
abstract class AbstractValidator
{
	public $language='cn';

	abstract public function validate($label,$value);
	
	abstract public function message($label);
	
	public function isEmpty($value,$trim=false){
		return $value===null || $value===array() || $value==='' || $trim && is_scalar($value) && trim($value)==='';
	}
}